<!--
 * @Description: 
 * @Author: Devin
 * @Date: 2021-11-05 15:14:13
 * @LastEditTime: 2022-02-08 09:32:15
 * @LastEditors: Please set LastEditors
 * @Reference: 
-->
<template>
  <div class="components">
    <el-card>
      <template #header>
        <div class="el-card-header">普通消息提示</div>
        <div class="el-card-header-tip">进行了二次封装，使得消息提示不在重复</div>
      </template>
      <CcButton @click="showMessageFun">不重复消息提示</CcButton>
    </el-card>
  </div>
</template>

<script lang="ts">
import { getCurrentInstance } from '@vue/runtime-core';

export default {
  setup() {
    /**
     * @description: 点击登录
     * @param {*}
     * @return {*} void
     * @default
     */
    let vue: Record<string, any> | undefined = getCurrentInstance()?.appContext?.config.globalProperties;
    const showMessageFun = (): void => {
      vue?.$_message.success('不重复消息提示');
    };
    return { showMessageFun };
  }
};
</script>

<style scoped lang="scss"></style>
